using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using Barrage.Global;

namespace Spacedash.Logic.Scenario.Cells.Actions
{
    class AccelCellAction : CellAction
    {
        float acceleration;
        const string XML_ACCELERATION_ATTRIBUTE = "acceleration";
        const float DEFAULT_ACCELERATION = 0.25f;
        public AccelCellAction(XmlNode xn)
        {
            acceleration = XmlHelper.ParseXMLFloatAttribute(xn, XML_ACCELERATION_ATTRIBUTE, DEFAULT_ACCELERATION);
        }
        public override void Execute(Ship ship)
        {
            ship.Accelerate(acceleration);
        }
    }
}
